using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using MvcApplication1.Models;

namespace MvcApplication1.Controllers
{
    public class BookListController : Controller
    {
        //
        // GET: /BookList/

        LibraryDBEntities _db;

        public BookListController()
        {
            _db = new LibraryDBEntities();
        }

        public ActionResult Index()
        {
            ViewData.Model = _db.Books.ToList();

            return View();
        }

    }
}
